﻿@model CNav.Model.LoginModel

@{
    ViewBag.Title = "Log in";
}
@using (Html.BeginForm(new { ReturnUrl = ViewBag.ReturnUrl }))
{
    @Html.AntiForgeryToken()
    @Html.ValidationSummary(true)

    <div id="smallForm">
        <h2>Use your account to log in.</h2>
        <ol>
            <li>
                @Html.LabelFor(m => m.UserName)
                @Html.TextBoxFor(m => m.UserName)
                <br />
                @Html.ValidationMessageFor(m => m.UserName)
            </li>
            <li>
                @Html.LabelFor(m => m.Password)
                @Html.PasswordFor(m => m.Password)
                <br />
                @Html.ValidationMessageFor(m => m.Password)
            </li>
            <li>
                <label>&nbsp;</label>
                @Html.CheckBoxFor(m => m.RememberMe)
                @Html.LabelFor(m => m.RememberMe, new { @class = "checkbox" })
            </li>
            <li>
                <label>&nbsp;</label>
                <input type="submit" value="Log in" />
                <input type="button" value="Register" id="btnRegister" />
            </li>
            <li>
               <label>&nbsp;</label>  @Html.ActionLink("Register", "Register", "RegisterBusiness") if you don't have an account.
            </li>
        </ol>
    </div>
      
}

<script>
    $(function () {

        var cc = new CaseCentre();
        cc.Accordion("#smallForm");
        cc.BindButton('#btnRegister', '@Url.Content("~/RegisterBusiness/Register")');
    });
</script>
